39. Using the Help System

Note

The below information is extensively based in information taken from the PowerShell® Notes for Professionals book. I plan to extend this information based on my day to day usage of the language.

39.1: Updating the Help System

Version > 3.0

Beginning with PowerShell 3.0, you can download and update the offline help documentation using a single cmdlet.

1
Update-Help

To update help on multiple computers (or computers not connected to the internet).

Run the following on a computer with the help files

1
Save-Help -DestinationPath \\Server01\Share\PSHelp _-Credential_ $Cred

To run on many computers remotely

1
Invoke-Command _-ComputerName_ ( **Get-Content** Servers.txt) - ScriptBlock {Update-Help -SourcePath \\Server01\Share\Help _-Credential_ $cred}

39.2: Using Get-Help

Get-Help can be used to view help in PowerShell. You can search for cmdlets, functions, providers or other topics.

In order to view the help documentation about jobs, use:

1
Get-Help about_Jobs

You can search for topics using wildcards. If you want to list available help topics with a title starting with about_,

try:

1
Get-Help about_*

If you wanted help on Select-Object, you would use:

1
Get-Help Select-Object

You can also use the aliases help or man.

39.3: Viewing online version of a help topic

You can access online help documentation using:

1
Get-Help Get-Command - Online

39.4: Viewing Examples

Show usage examples for a specific cmdlet.

1
Get-Help Get-Command -Examples

39.5: Viewing the Full Help Page

View the full documentation for the topic.

1
Get-Help Get-Command -Full

39.6: Viewing help for a specific parameter

You can view help for a specific parameter using:

1
Get-Help Get-Content -Parameter Path